.class public Ljavax/microedition/lcdui/StringItem;
.super Ljavax/microedition/lcdui/Item;
.source "StringItem.java"


# instance fields
.field stringComponent:Ljavax/microedition/lcdui/StringComponent;


# direct methods
.method public constructor <init>(Ljava/lang/String;Ljava/lang/String;)V
    .locals 1
    .parameter "label"
    .parameter "text"

    .prologue
    .line 32
    const/4 v0, 0x0

    invoke-direct {p0, p1, p2, v0}, Ljavax/microedition/lcdui/StringItem;-><init>(Ljava/lang/String;Ljava/lang/String;I)V

    .line 33
    return-void
.end method

.method public constructor <init>(Ljava/lang/String;Ljava/lang/String;I)V
    .locals 1
    .parameter "label"
    .parameter "text"
    .parameter "appearanceMode"

    .prologue
    .line 36
    invoke-direct {p0, p1}, Ljavax/microedition/lcdui/Item;-><init>(Ljava/lang/String;)V

    .line 37
    new-instance v0, Ljavax/microedition/lcdui/StringComponent;

    invoke-direct {v0, p2}, Ljavax/microedition/lcdui/StringComponent;-><init>(Ljava/lang/String;)V

    iput-object v0, p0, Ljavax/microedition/lcdui/StringItem;->stringComponent:Ljavax/microedition/lcdui/StringComponent;

    .line 39
    return-void
.end method


# virtual methods
.method public getAppearanceMode()I
    .locals 1

    .prologue
    .line 43
    const/4 v0, 0x0

    return v0
.end method

.method public getFont()Ljavax/microedition/lcdui/Font;
    .locals 1

    .prologue
    .line 48
    invoke-static {}, Ljavax/microedition/lcdui/Font;->getDefaultFont()Ljavax/microedition/lcdui/Font;

    move-result-object v0

    return-object v0
.end method

.method getHeight()I
    .locals 2

    .prologue
    .line 69
    invoke-super {p0}, Ljavax/microedition/lcdui/Item;->getHeight()I

    move-result v0

    iget-object v1, p0, Ljavax/microedition/lcdui/StringItem;->stringComponent:Ljavax/microedition/lcdui/StringComponent;

    invoke-virtual {v1}, Ljavax/microedition/lcdui/StringComponent;->getHeight()I

    move-result v1

    add-int/2addr v0, v1

    return v0
.end method

.method public getText()Ljava/lang/String;
    .locals 1

    .prologue
    .line 60
    iget-object v0, p0, Ljavax/microedition/lcdui/StringItem;->stringComponent:Ljavax/microedition/lcdui/StringComponent;

    invoke-virtual {v0}, Ljavax/microedition/lcdui/StringComponent;->getText()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method paint(Ljavax/microedition/lcdui/Graphics;)I
    .locals 2
    .parameter "g"

    .prologue
    const/4 v1, 0x0

    .line 73
    invoke-super {p0, p1}, Ljavax/microedition/lcdui/Item;->paintContent(Ljavax/microedition/lcdui/Graphics;)V

    .line 75
    invoke-super {p0}, Ljavax/microedition/lcdui/Item;->getHeight()I

    move-result v0

    invoke-virtual {p1, v1, v0}, Ljavax/microedition/lcdui/Graphics;->translate(II)V

    .line 76
    iget-object v0, p0, Ljavax/microedition/lcdui/StringItem;->stringComponent:Ljavax/microedition/lcdui/StringComponent;

    invoke-virtual {v0, p1}, Ljavax/microedition/lcdui/StringComponent;->paint(Ljavax/microedition/lcdui/Graphics;)I

    .line 77
    invoke-super {p0}, Ljavax/microedition/lcdui/Item;->getHeight()I

    move-result v0

    neg-int v0, v0

    invoke-virtual {p1, v1, v0}, Ljavax/microedition/lcdui/Graphics;->translate(II)V

    .line 79
    invoke-virtual {p0}, Ljavax/microedition/lcdui/StringItem;->getHeight()I

    move-result v0

    return v0
.end method

.method public setFont(Ljavax/microedition/lcdui/Font;)V
    .locals 0
    .parameter "font"

    .prologue
    .line 53
    return-void
.end method

.method public setPreferredSize(II)V
    .locals 0
    .parameter "width"
    .parameter "height"

    .prologue
    .line 57
    return-void
.end method

.method public setText(Ljava/lang/String;)V
    .locals 1
    .parameter "text"

    .prologue
    .line 64
    iget-object v0, p0, Ljavax/microedition/lcdui/StringItem;->stringComponent:Ljavax/microedition/lcdui/StringComponent;

    invoke-virtual {v0, p1}, Ljavax/microedition/lcdui/StringComponent;->setText(Ljava/lang/String;)V

    .line 65
    invoke-virtual {p0}, Ljavax/microedition/lcdui/StringItem;->repaint()V

    .line 66
    return-void
.end method

.method traverse(IIIZ)I
    .locals 3
    .parameter "gameKeyCode"
    .parameter "top"
    .parameter "bottom"
    .parameter "action"

    .prologue
    const v2, 0x7fffffff

    .line 83
    invoke-static {}, Ljavax/microedition/lcdui/Font;->getDefaultFont()Ljavax/microedition/lcdui/Font;

    move-result-object v0

    .line 85
    .local v0, f:Ljavax/microedition/lcdui/Font;
    const/4 v1, 0x1

    if-ne p1, v1, :cond_2

    .line 86
    if-lez p2, :cond_1

    .line 87
    invoke-virtual {v0}, Ljavax/microedition/lcdui/Font;->getHeight()I

    move-result v1

    rem-int v1, p2, v1

    if-nez v1, :cond_0

    .line 88
    invoke-virtual {v0}, Ljavax/microedition/lcdui/Font;->getHeight()I

    move-result v1

    neg-int v1, v1

    .line 108
    :goto_0
    return v1

    .line 90
    :cond_0
    invoke-virtual {v0}, Ljavax/microedition/lcdui/Font;->getHeight()I

    move-result v1

    rem-int v1, p2, v1

    neg-int v1, v1

    goto :goto_0

    :cond_1
    move v1, v2

    .line 93
    goto :goto_0

    .line 96
    :cond_2
    const/4 v1, 0x6

    if-ne p1, v1, :cond_5

    .line 97
    invoke-virtual {p0}, Ljavax/microedition/lcdui/StringItem;->getHeight()I

    move-result v1

    if-ge p3, v1, :cond_4

    .line 98
    invoke-virtual {p0}, Ljavax/microedition/lcdui/StringItem;->getHeight()I

    move-result v1

    sub-int/2addr v1, p3

    invoke-virtual {v0}, Ljavax/microedition/lcdui/Font;->getHeight()I

    move-result v2

    if-ge v1, v2, :cond_3

    .line 99
    invoke-virtual {p0}, Ljavax/microedition/lcdui/StringItem;->getHeight()I

    move-result v1

    sub-int/2addr v1, p3

    goto :goto_0

    .line 101
    :cond_3
    invoke-virtual {v0}, Ljavax/microedition/lcdui/Font;->getHeight()I

    move-result v1

    goto :goto_0

    :cond_4
    move v1, v2

    .line 104
    goto :goto_0

    .line 108
    :cond_5
    const/4 v1, 0x0

    goto :goto_0
.end method
